{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}
{% import "TopxiaAdminBundle::macro.html.twig" as admin_macro %}
{% set modalSize = 'large' %}

{% block title %}{{'订单详情'|trans}}{% endblock %}
{% block body %}
    
        {% if orderLogs %}
        <table class="table">
          <thead>
            <tr>
              <th width="50%">{{'日志信息'|trans}}</th>
              <th width="25%">{{'操作人'|trans}}</th>
              <th width="25%">{{'创建时间'|trans}}</th>
            </tr>
          </thead>
          <tbody>
            {% for orderLog in orderLogs %}
              {% set logUser = users[orderLog.userId]|default(null) %}
              <tr>
                <td>
                  {{ orderLog.message | plain_text(50) }}
                  <br>
                  <span class="text-muted text-sm">{{ orderLog.type }}</span>
                </td>
                <td>
                  {% if logUser %}
                    {{ admin_macro.user_link(logUser) }}
                  {% else %}
                    --
                  {% endif %}
                </td>
                <td>
                  {{ orderLog.createdTime|date('Y-n-d H:i')}}
                  <br>
                  <span class="text-muted text-sm">{{ orderLog.ip}}</span>
                </td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      {% else %}
      <div class="empty">{{'暂无交易日志!'|trans}}</div>
      {% endif %}
     
{% endblock %}

{% block footer %}
  <div>
    <button type="button" class="btn btn-primary" data-dismiss="modal">{{'关闭'|trans}}</button>
  </div>

{% endblock %}

